using System;
using System.Collections.Generic;
using System.Text;
using Decav.Geography;

namespace Decav.Geocoding
{
    /// <summary>
    /// The geographical information for an address that has been located by a geocoder.
    /// </summary>
    public class GeocodeAddressResult : GeocodeResult
    {
        public GeocodeAddressResult(LatLongPoint position, StreetAddress street, string city, string state, string postalCode)
            : base(position, city, state, postalCode)
        {
            _street = street;
        }

        /// <summary>
        /// Gets the street information about the address.
        /// </summary>
        public StreetAddress Street
        {
            get
            {
                return _street;
            }
        }

        private StreetAddress _street;

        public override string ToString()
        {
            return string.Format("{0}\r\n{1}", Street, SecondLineToString());
        }
    }
}
